Skip to content

Handle Swift 6.2 sendability changes #789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2025
Merged

Handle Swift 6.2 sendability changes #789

merged 3 commits into from
Jun 27, 2025

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Jun 27, 2025

Adds SendableMetatype conformance to the ExpressibleByArgument and ParsableArguments protocols, enabling existential use in Swift 6.2.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

SendableMetatype is a marker protocol, so while it doesn't have
runtime availability requirements, it's only available with >= 6.2
Swift compiler.
@natecook1000
Copy link
Member Author

FWIW the API breakage check only passes because it's using a 6.0 compiler and not a 6.2 compiler that would see the SendableMetatype requirement. That said, I don't believe this will be source breaking in practice because:

  • it will only affect those using the Swift 6.2 compiler or greater
  • it will only pose a problem for types with isolated conformances to ParsableArguments or ExpressibleByArgument, which there shouldn't really be any yet

@natecook1000
Copy link
Member Author

@swift-ci Please test

Uses an underscored protocol to conditionally include conformance
without repeating the entire declaration (thanks @rauhul).
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

With the updated approach the API breakage check fails now, but the notes above still apply.

@natecook1000 natecook1000 merged commit cf0f6b1 into main Jun 27, 2025
27 of 28 checks passed
@natecook1000 natecook1000 deleted the sendable-update branch June 27, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant